﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db;
using HengTong.Model;
using HengTong.Model.Db.System;


namespace HengTong.ViewModel._Admin.SysCodeRuleVms
{
    public partial class SysCodeRuleTemplateVm : BaseTemplateVM
    {
        [Display(Name = "编码名称")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.Name);
        [Display(Name = "编码类型")]
        public ExcelPropety CodeTypeExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.CodeType);
        [Display(Name = "编码前缀")]
        public ExcelPropety PrefixExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.Prefix);
        [Display(Name = "日期格式")]
        public ExcelPropety DateFormatExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.DateFormat);
        [Display(Name = "序号长度")]
        public ExcelPropety SerialLengthExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.SerialLength);
        [Display(Name = "编码后缀")]
        public ExcelPropety SuffixExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.Suffix);
        [Display(Name = "重置规则")]
        public ExcelPropety ResetRuleExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.ResetRule);
        [Display(Name = "当前序号")]
        public ExcelPropety CurrentSerialExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.CurrentSerial);
        [Display(Name = "最后生成时间")]
        public ExcelPropety LastGenerateTimeExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.LastGenerateTime);
        [Display(Name = "最后重置时间")]
        public ExcelPropety LastResetTimeExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.LastResetTime);
        [Display(Name = "是否启用")]
        public ExcelPropety IsEnabledExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.IsEnabled);
        [Display(Name = "排序")]
        public ExcelPropety SortExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.Sort);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.Remark);
        [Display(Name = "租户代码")]
        public ExcelPropety TenantCodeExcel = ExcelPropety.CreateProperty<SysCodeRule>(x => x.TenantCode);

	    protected override void InitVM()
        {
        }

    }

    public class SysCodeRuleImportVm : BaseImportVM<SysCodeRuleTemplateVm, SysCodeRule>
    {

    }

}
